package com.kauto.gps.listener;

import com.kauto.gps.GpsFileManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class GpsListener implements ApplicationListener<ApplicationReadyEvent> {

    @Autowired
    private GpsFileManager gpsFileManager;

    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        log.debug("<<<<<<<onApplicationEvent>>>>>>>>>");
        gpsFileManager.init();
        log.debug("<<<<<<<-------VisListener END-------->>>>>>>>>");
    }
}